<?php

class Config {
	
	public static function load($dir,$type) {
		try{
			switch ($type){
				case 'dev':
					$conf = parse_ini_file($dir.'/config/config.dev.inc',true);
					break;
				case 'prod':
					$conf = parse_ini_file($dir.'/config/config.prod.inc');
					break;
				default:
					break;
			}
		}catch (Exception $e){
			die($e->getMessage());
		}
		return $conf;
		
	}
}

?>